package com.pocket.demo.core.validation;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

/**
 * 【demo-spring-validation-5-2】
 */
@Target({
        ElementType.METHOD,
        ElementType.FIELD,
        ElementType.ANNOTATION_TYPE,
        ElementType.CONSTRUCTOR,
        ElementType.PARAMETER,
        ElementType.TYPE_USE
})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(
        validatedBy = MobileValidator.class
)
public @interface Mobile {

    // TODO  处理自定义注解的国际化解析
    String message() default "javax.validation.constraints.Size.message";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
